package com.example.user.myfirstapp.common;

import android.app.Activity;
import android.app.ProgressDialog;

import com.example.user.myfirstapp.R;

/**
 * Created by user on 2016/5/24.
 */
public class LoadingDialog {
    private static ProgressDialog progressDialog;

//    public static void showLoading(Activity activity,String msg){
//        //progressDialog = ProgressDialog.show(activity, null, msg);
//        progressDialog=new ProgressDialog(activity, R.style.progressDialogTheme);
//        progressDialog.setMessage(msg);
//        progressDialog.show();
//    }
//
//    public static void closeLoading(){
//        if (progressDialog != null && progressDialog.isShowing()) {
//            progressDialog.dismiss();
//            progressDialog = null;
//        }
//    }


    /*
        我的自定义ProgressDialog
    */

    public static void showLoading(Activity activity,String msg){
        com.qk.myprogressdialog.MyProgressDialog.showDialog(activity,msg);
    }

    public static void closeLoading(){
        com.qk.myprogressdialog.MyProgressDialog.closeDialog();
    }
}
